<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      size="small"
      :inline="true"
      v-show="showSearch"
      label-width="68px"
    >
      <el-form-item label="姓名" prop="name">
        <el-input
          v-model="queryParams.name"
          placeholder="请输入姓名"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="性别" prop="gender">
        <el-select
          v-model="queryParams.gender"
          placeholder="请选择性别"
          clearable
        >
          <el-option
            v-for="dict in dict.type.gender"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="身份证号" prop="idcard">
        <el-input
          v-model="queryParams.idcard"
          placeholder="请输入身份证号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <!-- <el-form-item label="民族" prop="nation">
        <el-input
          v-model="queryParams.nation"
          placeholder="请输入民族"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="曾用名" prop="usedName">
        <el-input
          v-model="queryParams.usedName"
          placeholder="请输入曾用名"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>

      <el-form-item label="出生日期" prop="birth">
        <el-date-picker clearable
          v-model="queryParams.birth"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择出生日期">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="籍贯" prop="nativePlace">
        <el-input
          v-model="queryParams.nativePlace"
          placeholder="请输入籍贯"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="住址" prop="address">
        <el-input
          v-model="queryParams.address"
          placeholder="请输入住址"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="电话" prop="phone">
        <el-input
          v-model="queryParams.phone"
          placeholder="请输入电话"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="政治面貌" prop="political">
        <el-select v-model="queryParams.political" placeholder="请选择政治面貌" clearable>
          <el-option
            v-for="dict in dict.type.political_outlook"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item> -->
      <el-form-item label="第一学历" prop="firstLevel">
        <el-select
          v-model="queryParams.firstLevel"
          placeholder="请选择第一学历"
          clearable
        >
          <el-option
            v-for="dict in dict.type.first_level"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <!-- <el-form-item label="第一学历毕业学校" prop="firstSchool">
        <el-input
          v-model="queryParams.firstSchool"
          placeholder="请输入第一学历毕业学校"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="第一学历毕业时间" prop="firstDate">
        <el-date-picker clearable
          v-model="queryParams.firstDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择第一学历毕业时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="第一学历专业" prop="firstMajor">
        <el-input
          v-model="queryParams.firstMajor"
          placeholder="请输入第一学历专业"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item> -->
      <el-form-item label="最高学历" prop="lastLevel">
        <el-input
          v-model="queryParams.lastLevel"
          placeholder="请输入最高学历"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="全日制否" prop="isFulltime">
        <el-select
          v-model="queryParams.isFulltime"
          placeholder="请选择是否全日制"
          clearable
        >
          <el-option
            v-for="dict in dict.type.is_fulltime"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <!-- <el-form-item label="最高学历毕业学校" prop="lastSchool">
        <el-input
          v-model="queryParams.lastSchool"
          placeholder="请输入最高学历毕业学校"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="最高学历毕业时间" prop="lastDate">
        <el-date-picker clearable
          v-model="queryParams.lastDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择最高学历毕业时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="最高学历专业" prop="lastMajor">
        <el-input
          v-model="queryParams.lastMajor"
          placeholder="请输入最高学历专业"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="存档单位" prop="archivesUnit">
        <el-input
          v-model="queryParams.archivesUnit"
          placeholder="请输入存档单位"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="档案编号" prop="archivesNumber">
        <el-input
          v-model="queryParams.archivesNumber"
          placeholder="请输入档案编号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item> -->
      <!-- <el-form-item label="有无职称" prop="hasProfession">
        <el-input
          v-model="queryParams.hasProfession"
          placeholder="请输入有无职称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="有无证书" prop="hasCertificate">
        <el-input
          v-model="queryParams.hasCertificate"
          placeholder="请输入有无证书"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="有无获奖" prop="hasAward">
        <el-input
          v-model="queryParams.hasAward"
          placeholder="请输入有无获奖"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="有无专利" prop="hasPatent">
        <el-input
          v-model="queryParams.hasPatent"
          placeholder="请输入有无专利"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="有无论文" prop="hasPaper">
        <el-input
          v-model="queryParams.hasPaper"
          placeholder="请输入有无论文"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item> -->
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >搜索</el-button
        >
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        >
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['profession:basicInfo:add']"
          >新增</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['profession:basicInfo:edit']"
          >修改</el-button
        >
      </el-col>
      <!-- <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['profession:basicInfo:remove']"
          >删除</el-button
        >
      </el-col> -->
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['profession:basicInfo:export']"
          >导出</el-button
        >
      </el-col>
      <right-toolbar
        :showSearch.sync="showSearch"
        @queryTable="getList"
      ></right-toolbar>
    </el-row>

    <!-- 表头 -->
    <el-table
      v-loading="loading"
      :data="basicInfoList"
      @selection-change="handleSelectionChange"
      stripe
    >
      <el-table-column type="selection" width="55" align="center" />
      <!-- <el-table-column label="id" align="center" prop="id" /> -->
      <!-- <el-table-column label="照片" align="center" prop="photo" /> -->
      <!-- <el-table-column
        label="身份证正面扫描"
        align="center"
        prop="idcardFront"
      />
      <el-table-column
        label="身份证反面扫描"
        align="center"
        prop="idcardBack"
      /> -->
      <el-table-column label="姓名" align="center" prop="name" fixed="left" />
      <el-table-column label="性别" align="center" prop="gender">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.gender" :value="scope.row.gender" />
        </template>
      </el-table-column>
      <!-- <el-table-column label="民族" align="center" prop="nation" /> -->
      <!-- <el-table-column label="曾用名" align="center" prop="usedName" /> -->
      <el-table-column
        label="身份证号"
        align="center"
        prop="idcard"
        width="170"
      />
      <!-- <el-table-column label="出生日期" align="center" prop="birth" width="140">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.birth, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column> -->
      <!-- <el-table-column label="籍贯" align="center" prop="nativePlace" /> -->
      <!-- <el-table-column label="住址" align="center" prop="address" width="300" /> -->
      <el-table-column label="电话" align="center" prop="phone" width="140" />
      <!-- <el-table-column label="政治面貌" align="center" prop="political">
        <template slot-scope="scope">
          <dict-tag
            :options="dict.type.political_outlook"
            :value="scope.row.political"
          />
        </template>
      </el-table-column> -->
      <el-table-column label="第一学历" align="center" prop="firstLevel">
        <template slot-scope="scope">
          <dict-tag
            :options="dict.type.first_level"
            :value="scope.row.firstLevel"
          />
        </template>
      </el-table-column>
      <!-- <el-table-column
        label="第一学历毕业学校"
        align="center"
        prop="firstSchool"
        width="160"
      />
      <el-table-column
        label="第一学历毕业时间"
        align="center"
        prop="firstDate"
        width="160"
      >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.firstDate, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="第一学历专业"
        align="center"
        prop="firstMajor"
        width="140"
      />  -->
      <el-table-column label="最高学历" align="center" prop="lastLevel" />
      <el-table-column label="全日制否" align="center" prop="isFulltime">
        <template slot-scope="scope">
          <dict-tag
            :options="dict.type.is_fulltime"
            :value="scope.row.isFulltime"
          />
        </template>
      </el-table-column>
      <!-- <el-table-column
        label="最高学历毕业学校"
        align="center"
        prop="lastSchool"
        width="160"
      />
      <el-table-column
        label="最高学历毕业时间"
        align="center"
        prop="lastDate"
        width="160"
      >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.lastDate, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="最高学历专业"
        align="center"
        prop="lastMajor"
        width="140"
      />
      <el-table-column
        label="存档单位"
        align="center"
        prop="archivesUnit"
        width="140"
      />
      <el-table-column
        label="档案编号"
        align="center"
        prop="archivesNumber"
        width="130"
      /> 
      <el-table-column label="有无职称" align="center" prop="hasProfession">
        <template slot-scope="scope">
          <dict-tag
            :options="dict.type.has_profession"
            :value="scope.row.hasProfession"
          />
        </template>
      </el-table-column>
      <el-table-column label="有无证书" align="center" prop="hasCertificate">
        <template slot-scope="scope">
          <dict-tag
            :options="dict.type.has_certificate"
            :value="scope.row.hasCertificate"
          />
        </template>
      </el-table-column>
      <el-table-column label="有无获奖" align="center" prop="hasAward">
        <template slot-scope="scope">
          <dict-tag
            :options="dict.type.has_award"
            :value="scope.row.hasAward"
          />
        </template>
      </el-table-column>
      <el-table-column label="有无专利" align="center" prop="hasPatent">
        <template slot-scope="scope">
          <dict-tag
            :options="dict.type.has_patent"
            :value="scope.row.hasPatent"
          />
        </template>
      </el-table-column>
      <el-table-column label="有无论文" align="center" prop="hasPaper">
        <template slot-scope="scope">
          <dict-tag
            :options="dict.type.has_paper"
            :value="scope.row.hasPaper"
          />
        </template>
      </el-table-column>
      <el-table-column label="有无进修" align="center" prop="hasStudy">
        <template slot-scope="scope">
          <dict-tag
            :options="dict.type.has_study"
            :value="scope.row.hasStudy"
          />
        </template>
      </el-table-column>
      <el-table-column
        label="创建时间"
        align="center"
        prop="createTime"
        width="180"
      >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.createTime) }}</span>
        </template>
      </el-table-column>
      -->
      <el-table-column
        label="操作"
        align="center"
        class-name="small-padding fixed-width"
        fixed="right"
      >
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['profession:basicInfo:edit']"
            >修改</el-button
          >
          <el-button
            size="mini"
            type="text"
            @click="handleClick(scope.row)"
            v-hasPermi="['profession:basicInfo:query']"
            ><i class="el-icon-view el-icon--right"></i>详情</el-button
          >
          <!-- <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['profession:basicInfo:remove']"
            >删除</el-button
          > -->
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加对话框 原先width="1050px" -->
    <el-dialog :title="title" :visible.sync="open" width="70%" append-to-body>
      <el-tabs :tab-position="tabPosition" style="height: 400px">
        <el-tab-pane label="基本信息">
          <el-form ref="form" :model="form" :rules="rules" label-width="100px">
            <el-row>
              <el-col :span="6">
                <el-form-item label="姓名" prop="name">
                  <el-input v-model="form.name" placeholder="请输入姓名" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="性别" prop="gender">
                  <el-select v-model="form.gender" placeholder="请选择性别">
                    <el-option
                      v-for="dict in dict.type.gender"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="电话" prop="phone">
                  <el-input v-model="form.phone" placeholder="请输入电话" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="曾用名" prop="usedName">
                  <el-input
                    v-model="form.usedName"
                    placeholder="请输入曾用名"
                  />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item label="籍贯" prop="nativePlace">
                  <el-input
                    v-model="form.nativePlace"
                    placeholder="请输入籍贯"
                  />
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="住址" prop="address">
                  <el-input v-model="form.address" placeholder="请输入住址" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="民族" prop="nation">
                  <el-input v-model="form.nation" placeholder="请输入民族" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <el-form-item label="身份证号" prop="idcard">
                  <el-input
                    v-model="form.idcard"
                    placeholder="请输入身份证号"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="出生日期" prop="birth">
                  <el-date-picker
                    clearable
                    v-model="form.birth"
                    type="date"
                    value-format="yyyy-MM-dd"
                    style="width: 140px"
                    placeholder="请选择出生日期"
                  >
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="预留照片" prop="birth"> </el-form-item
              ></el-col>
            </el-row>
            <el-row>
              <el-col :span="5">
                <el-form-item label="政治面貌" prop="political">
                  <el-input
                    v-model="form.political"
                    placeholder="请输入政治面貌"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="全日制否" prop="isFulltime">
                  <el-select
                    v-model="form.isFulltime"
                    placeholder="请选择是否全日制"
                  >
                    <el-option
                      v-for="dict in dict.type.is_fulltime"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="毕业学校" prop="firstSchool">
                  <el-input
                    v-model="form.firstSchool"
                    placeholder="请输入第一学历毕业学校"
                  />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="5">
                <el-form-item label="第一学历" prop="firstLevel">
                  <el-select
                    v-model="form.firstLevel"
                    placeholder="请选择第一学历"
                  >
                    <el-option
                      v-for="dict in dict.type.first_level"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="毕业时间" prop="firstDate">
                  <el-date-picker
                    clearable
                    v-model="form.firstDate"
                    type="date"
                    value-format="yyyy-MM-dd"
                    placeholder="请选择第一学历毕业时间"
                    style="width: 140px"
                  >
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="7">
                <el-form-item label="第一专业" prop="firstMajor">
                  <el-input
                    v-model="form.firstMajor"
                    placeholder="请输入第一学历专业"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="6">照片预留</el-col>
            </el-row>
            <el-row>
              <el-col :span="5">
                <el-form-item label="最高学历" prop="lastLevel">
                  <el-input
                    v-model="form.lastLevel"
                    placeholder="请输入最高学历"
                  />
                </el-form-item>
              </el-col>

              <el-col :span="6">
                <el-form-item label="毕业时间" prop="lastDate">
                  <el-date-picker
                    clearable
                    v-model="form.lastDate"
                    type="date"
                    value-format="yyyy-MM-dd"
                    placeholder="请选择最高学历毕业时间"
                    style="width: 140px"
                  >
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="7">
                <el-form-item label="毕业学校" prop="lastSchool">
                  <el-input
                    v-model="form.lastSchool"
                    placeholder="请输入最高学历毕业学校"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="最高专业" prop="lastMajor">
                  <el-input
                    v-model="form.lastMajor"
                    placeholder="请输入最高学历专业"
                  />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="9">
                <el-form-item label="存档单位" prop="archivesUnit">
                  <el-input
                    v-model="form.archivesUnit"
                    placeholder="请输入存档单位"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="有无职称" prop="hasProfession">
                  <el-select
                    v-model="form.hasProfession"
                    placeholder="请选择有无职称"
                  >
                    <el-option
                      v-for="dict in dict.type.has_profession"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="有无证书" prop="hasCertificate">
                  <el-select
                    v-model="form.hasCertificate"
                    placeholder="请选择有无证书"
                  >
                    <el-option
                      v-for="dict in dict.type.has_certificate"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="有无获奖" prop="hasAward">
                  <el-select
                    v-model="form.hasAward"
                    placeholder="请选择有无获奖"
                  >
                    <el-option
                      v-for="dict in dict.type.has_award"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="9">
                <el-form-item label="档案编号" prop="archivesNumber">
                  <el-input
                    v-model="form.archivesNumber"
                    placeholder="请输入档案编号"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="有无专利" prop="hasPatent">
                  <el-select
                    v-model="form.hasPatent"
                    placeholder="请选择有无专利"
                  >
                    <el-option
                      v-for="dict in dict.type.has_patent"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>

              <el-col :span="5">
                <el-form-item label="有无论文" prop="hasPaper">
                  <el-select
                    v-model="form.hasPaper"
                    placeholder="请选择有无论文"
                  >
                    <el-option
                      v-for="dict in dict.type.has_paper"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="有无进修" prop="hasStudy">
                  <el-select
                    v-model="form.hasStudy"
                    placeholder="请选择有无进修"
                  >
                    <el-option
                      v-for="dict in dict.type.has_study"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select> </el-form-item
              ></el-col>
            </el-row>
          </el-form>
        </el-tab-pane>
        <el-tab-pane label="进修经历">
          <education-training-add></education-training-add>
        </el-tab-pane>
        <el-tab-pane label="奖项信息">
          <awards-add></awards-add>
        </el-tab-pane>
        <el-tab-pane label="履历信息">
          <career-info-add></career-info-add>
        </el-tab-pane>
        <el-tab-pane label="其它证书">
          <other-certificates-add></other-certificates-add>
        </el-tab-pane>
        <el-tab-pane label="刊物论文">
          <papers-add></papers-add>
        </el-tab-pane>
        <el-tab-pane label="专利信息">
          <patents-add></patents-add>
        </el-tab-pane>
        <el-tab-pane label="职称信息">
          <professional-title-add></professional-title-add>
        </el-tab-pane>
        <el-tab-pane label="工作业绩">
          <work-achievements-add></work-achievements-add>
        </el-tab-pane>
        <el-tab-pane label="工作经验">
          <work-experience-add></work-experience-add>
        </el-tab-pane>
      </el-tabs>

      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 修改对话框 原先width="1050px" -->
    <el-dialog
      :title="title"
      :visible.sync="updateFormVisible"
      width="1050px"
      append-to-body
    >
      <el-tabs :tab-position="tabPosition" style="height: 550px">
        <el-tab-pane label="基本信息">
          <el-form ref="form" :model="form1" :rules="rules" label-width="100px">
            <el-row>
              <el-col :span="6">
                <el-form-item label="姓名" prop="name">
                  <el-input v-model="form1.name" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="性别" prop="gender">
                  <el-select v-model="form1.gender">
                    <el-option
                      v-for="dict in dict.type.gender"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="电话" prop="phone">
                  <el-input v-model="form1.phone" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="曾用名" prop="usedName">
                  <el-input v-model="form1.usedName" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item label="籍贯" prop="nativePlace">
                  <el-input v-model="form1.nativePlace" />
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="住址" prop="address">
                  <el-input v-model="form1.address" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="民族" prop="nation">
                  <el-input v-model="form1.nation" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <el-form-item label="身份证号" prop="idcard">
                  <el-input v-model="form1.idcard" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="出生日期" prop="birth">
                  <el-date-picker
                    clearable
                    v-model="form1.birth"
                    type="date"
                    value-format="yyyy-MM-dd"
                    style="width: 140px"
                  >
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="预留照片" prop="birth"> </el-form-item
              ></el-col>
            </el-row>
            <el-row>
              <el-col :span="5">
                <el-form-item label="政治面貌" prop="political">
                  <el-input v-model="form1.political" />
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="全日制否" prop="isFulltime">
                  <el-select v-model="form1.isFulltime">
                    <el-option
                      v-for="dict in dict.type.is_fulltime"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="毕业学校" prop="firstSchool">
                  <el-input v-model="form1.firstSchool" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="5">
                <el-form-item label="第一学历" prop="firstLevel">
                  <el-select v-model="form1.firstLevel">
                    <el-option
                      v-for="dict in dict.type.first_level"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="毕业时间" prop="firstDate">
                  <el-date-picker
                    clearable
                    v-model="form1.firstDate"
                    type="date"
                    value-format="yyyy-MM-dd"
                    style="width: 140px"
                  >
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="7">
                <el-form-item label="第一专业" prop="firstMajor">
                  <el-input v-model="form1.firstMajor" />
                </el-form-item>
              </el-col>
              <el-col :span="6">照片预留</el-col>
            </el-row>
            <el-row>
              <el-col :span="5">
                <el-form-item label="最高学历" prop="lastLevel">
                  <el-input v-model="form1.lastLevel" />
                </el-form-item>
              </el-col>

              <el-col :span="6">
                <el-form-item label="毕业时间" prop="lastDate">
                  <el-date-picker
                    clearable
                    v-model="form1.lastDate"
                    type="date"
                    value-format="yyyy-MM-dd"
                    style="width: 140px"
                  >
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="7">
                <el-form-item label="毕业学校" prop="lastSchool">
                  <el-input v-model="form1.lastSchool" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="最高专业" prop="lastMajor">
                  <el-input v-model="form1.lastMajor" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="9">
                <el-form-item label="存档单位" prop="archivesUnit">
                  <el-input v-model="form1.archivesUnit" />
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="有无职称" prop="hasProfession">
                  <el-select v-model="form1.hasProfession">
                    <el-option
                      v-for="dict in dict.type.has_profession"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="有无证书" prop="hasCertificate">
                  <el-select v-model="form1.hasCertificate">
                    <el-option
                      v-for="dict in dict.type.has_certificate"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="有无获奖" prop="hasAward">
                  <el-select v-model="form1.hasAward">
                    <el-option
                      v-for="dict in dict.type.has_award"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="9">
                <el-form-item label="档案编号" prop="archivesNumber">
                  <el-input v-model="form1.archivesNumber" />
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="有无专利" prop="hasPatent">
                  <el-select v-model="form1.hasPatent">
                    <el-option
                      v-for="dict in dict.type.has_patent"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>

              <el-col :span="5">
                <el-form-item label="有无论文" prop="hasPaper">
                  <el-select v-model="form1.hasPaper">
                    <el-option
                      v-for="dict in dict.type.has_paper"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="有无进修" prop="hasStudy">
                  <el-select v-model="form1.hasStudy">
                    <el-option
                      v-for="dict in dict.type.has_study"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select> </el-form-item
              ></el-col>
            </el-row>
          </el-form>
        </el-tab-pane>
        <el-tab-pane label="进修经历">
          <education-traning-query></education-traning-query>
        </el-tab-pane>
        <el-tab-pane label="奖项信息">
          <awards-query></awards-query>
        </el-tab-pane>
        <el-tab-pane label="履历信息">
          <career-info-query></career-info-query>
        </el-tab-pane>
        <el-tab-pane label="其它证书">
          <other-certificates-query></other-certificates-query>
        </el-tab-pane>
        <el-tab-pane label="刊物论文">
          <papers-query></papers-query>
        </el-tab-pane>
        <el-tab-pane label="专利信息">
          <patents-query></patents-query>
        </el-tab-pane>
        <el-tab-pane label="职称信息">
          <professional-title-query></professional-title-query>
        </el-tab-pane>
        <el-tab-pane label="工作业绩">
          <work-achievements-query></work-achievements-query>
        </el-tab-pane>
        <el-tab-pane label="工作经验">
          <work-experience-query></work-experience-query>
        </el-tab-pane>
      </el-tabs>

      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">关 闭</el-button>
      </div>
    </el-dialog>

    <!-- 查看对话框 -->
    <el-dialog
      :title="title"
      :visible.sync="dialogFormVisible"
      width="1050px"
      append-to-body
    >
      <el-tabs :tab-position="tabPosition" style="height: 550px">
        <el-tab-pane label="基本信息">
          <el-form
            ref="form2"
            :model="form2"
            :rules="rules"
            label-width="100px"
            disabled
          >
            <el-row>
              <el-col :span="6">
                <el-form-item label="姓名" prop="name">
                  <el-input v-model="form2.name" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="性别" prop="gender">
                  <el-select v-model="form2.gender">
                    <el-option
                      v-for="dict in dict.type.gender"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="电话" prop="phone">
                  <el-input v-model="form2.phone" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="曾用名" prop="usedName">
                  <el-input v-model="form2.usedName" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="6">
                <el-form-item label="籍贯" prop="nativePlace">
                  <el-input v-model="form2.nativePlace" />
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="住址" prop="address">
                  <el-input v-model="form2.address" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="民族" prop="nation">
                  <el-input v-model="form2.nation" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <el-form-item label="身份证号" prop="idcard">
                  <el-input v-model="form2.idcard" />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="出生日期" prop="birth">
                  <el-date-picker
                    clearable
                    v-model="form2.birth"
                    type="date"
                    value-format="yyyy-MM-dd"
                    style="width: 140px"
                  >
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="预留照片" prop="birth"> </el-form-item
              ></el-col>
            </el-row>
            <el-row>
              <el-col :span="5">
                <el-form-item label="政治面貌" prop="political">
                  <el-input v-model="form2.political" />
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="全日制否" prop="isFulltime">
                  <el-select v-model="form2.isFulltime">
                    <el-option
                      v-for="dict in dict.type.is_fulltime"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="毕业学校" prop="firstSchool">
                  <el-input v-model="form2.firstSchool" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="5">
                <el-form-item label="第一学历" prop="firstLevel">
                  <el-select v-model="form2.firstLevel">
                    <el-option
                      v-for="dict in dict.type.first_level"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="毕业时间" prop="firstDate">
                  <el-date-picker
                    clearable
                    v-model="form2.firstDate"
                    type="date"
                    value-format="yyyy-MM-dd"
                    style="width: 140px"
                  >
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="7">
                <el-form-item label="第一专业" prop="firstMajor">
                  <el-input v-model="form2.firstMajor" />
                </el-form-item>
              </el-col>
              <el-col :span="6">照片预留</el-col>
            </el-row>
            <el-row>
              <el-col :span="5">
                <el-form-item label="最高学历" prop="lastLevel">
                  <el-input v-model="form2.lastLevel" />
                </el-form-item>
              </el-col>

              <el-col :span="6">
                <el-form-item label="毕业时间" prop="lastDate">
                  <el-date-picker
                    clearable
                    v-model="form2.lastDate"
                    type="date"
                    value-format="yyyy-MM-dd"
                    style="width: 140px"
                  >
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="7">
                <el-form-item label="毕业学校" prop="lastSchool">
                  <el-input v-model="form2.lastSchool" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="最高专业" prop="lastMajor">
                  <el-input v-model="form2.lastMajor" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="9">
                <el-form-item label="存档单位" prop="archivesUnit">
                  <el-input v-model="form2.archivesUnit" />
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="有无职称" prop="hasProfession">
                  <el-select v-model="form2.hasProfession">
                    <el-option
                      v-for="dict in dict.type.has_profession"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="有无证书" prop="hasCertificate">
                  <el-select v-model="form2.hasCertificate">
                    <el-option
                      v-for="dict in dict.type.has_certificate"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="有无获奖" prop="hasAward">
                  <el-select v-model="form2.hasAward">
                    <el-option
                      v-for="dict in dict.type.has_award"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="9">
                <el-form-item label="档案编号" prop="archivesNumber">
                  <el-input v-model="form2.archivesNumber" />
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="有无专利" prop="hasPatent">
                  <el-select v-model="form2.hasPatent">
                    <el-option
                      v-for="dict in dict.type.has_patent"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>

              <el-col :span="5">
                <el-form-item label="有无论文" prop="hasPaper">
                  <el-select v-model="form2.hasPaper">
                    <el-option
                      v-for="dict in dict.type.has_paper"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="有无进修" prop="hasStudy">
                  <el-select v-model="form2.hasStudy">
                    <el-option
                      v-for="dict in dict.type.has_study"
                      :key="dict.value"
                      :label="dict.label"
                      :value="parseInt(dict.value)"
                    ></el-option>
                  </el-select> </el-form-item
              ></el-col>
            </el-row>
          </el-form>
        </el-tab-pane>
        <el-tab-pane label="进修经历">
          <education-traning-query></education-traning-query>
        </el-tab-pane>
        <el-tab-pane label="奖项信息">
          <awards-query></awards-query>
        </el-tab-pane>
        <el-tab-pane label="履历信息">
          <career-info-query></career-info-query>
        </el-tab-pane>
        <el-tab-pane label="其它证书">
          <other-certificates-query></other-certificates-query>
        </el-tab-pane>
        <el-tab-pane label="刊物论文">
          <papers-query></papers-query>
        </el-tab-pane>
        <el-tab-pane label="专利信息">
          <patents-query></patents-query>
        </el-tab-pane>
        <el-tab-pane label="职称信息">
          <professional-title-query></professional-title-query>
        </el-tab-pane>
        <el-tab-pane label="工作业绩">
          <work-achievements-query></work-achievements-query>
        </el-tab-pane>
        <el-tab-pane label="工作经验">
          <work-experience-query></work-experience-query>
        </el-tab-pane>
      </el-tabs>

      <div slot="footer" class="dialog-footer">
        <!-- <el-button type="primary" @click="submitForm">确 定</el-button> -->
        <el-button @click="cancel">关 闭</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  listBasicInfo,
  getBasicInfo,
  delBasicInfo,
  addBasicInfo,
  updateBasicInfo,
} from "@/api/profession/basicInfo";
import educationTrainingAdd from "./educationTrainingAdd.vue";
import educationTraningQuery from "./educationTrainingQuery.vue";
import awardsAdd from "./awardsAdd.vue";
import awardsQuery from "./awardsQuery.vue";
import careerInfoAdd from "./careerInfoAdd.vue";
import careerInfoQuery from "./careerInfoQuery.vue";
import papersAdd from "./papersAdd.vue";
import papersQuery from "./papersQuery.vue";
import otherCertificatesAdd from "./otherCertificatesAdd.vue";
import otherCertificatesQuery from "./otherCertificatesQuery.vue";
import patentsAdd from "./patentsAdd.vue";
import patentsQuery from "./patentsQuery.vue";
import professionalTitleAdd from "./professionalTitleAdd.vue";
import professionalTitleQuery from "./professionalTitleQuery.vue";
import workAchievementsAdd from "./workAchievementsAdd.vue";
import workAchievementsQuery from "./workAchievementsQuery.vue";
import workExperienceAdd from "./workExperienceAdd.vue";
import workExperienceQuery from "./workExperienceQuery.vue";

export default {
  components: {
    educationTrainingAdd,
    educationTraningQuery,
    awardsAdd,
    awardsQuery,
    careerInfoAdd,
    careerInfoQuery,
    papersAdd,
    papersQuery,
    otherCertificatesAdd,
    otherCertificatesQuery,
    patentsAdd,
    patentsQuery,
    professionalTitleAdd,
    professionalTitleQuery,
    workAchievementsAdd,
    workAchievementsQuery,
    workExperienceAdd,
    workExperienceQuery,
  },
  name: "BasicInfo",
  dicts: [
    "political_outlook",
    "is_fulltime",
    "gender",
    "first_level",
    "has_profession",
    "has_certificate",
    "has_award",
    "has_patent",
    "has_paper",
    "has_study",
  ],
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 人员基本信息表格数据
      basicInfoList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      dialogFormVisible: false,
      updateFormVisible: false,
      //其它信息tab页
      tabPosition: "left",
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        photo: null,
        idcardFront: null,
        idcardBack: null,
        name: null,
        gender: null,
        nation: null,
        usedName: null,
        idcard: null,
        birth: null,
        nativePlace: null,
        address: null,
        phone: null,
        political: null,
        firstLevel: null,
        firstSchool: null,
        firstDate: null,
        firstMajor: null,
        lastLevel: null,
        isFulltime: null,
        lastSchool: null,
        lastDate: null,
        lastMajor: null,
        archivesUnit: null,
        archivesNumber: null,
        hasProfession: null,
        hasCertificate: null,
        hasAward: null,
        hasPatent: null,
        hasPaper: null,
        hasStudy: null,
      },
      // 表单参数
      form: {},
      form1: {},
      form2: {},
      // 表单校验
      rules: {
        name: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
        gender: [
          { required: true, message: "性别不能为空", trigger: "change" },
        ],
      },
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询人员基本信息列表 */
    getList() {
      this.loading = true;
      listBasicInfo(this.queryParams).then((response) => {
        this.basicInfoList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.dialogFormVisible = false;
      this.updateFormVisible = false;

      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        photo: null,
        idcardFront: null,
        idcardBack: null,
        name: null,
        gender: null,
        nation: null,
        usedName: null,
        idcard: null,
        birth: null,
        nativePlace: null,
        address: null,
        phone: null,
        political: null,
        firstLevel: null,
        firstSchool: null,
        firstDate: null,
        firstMajor: null,
        lastLevel: null,
        isFulltime: null,
        lastSchool: null,
        lastDate: null,
        lastMajor: null,
        archivesUnit: null,
        archivesNumber: null,
        hasProfession: null,
        hasCertificate: null,
        hasAward: null,
        hasPatent: null,
        hasPaper: null,
        hasStudy: null,
      };
      this.form1 = {
        id: null,
        photo: null,
        idcardFront: null,
        idcardBack: null,
        name: null,
        gender: null,
        nation: null,
        usedName: null,
        idcard: null,
        birth: null,
        nativePlace: null,
        address: null,
        phone: null,
        political: null,
        firstLevel: null,
        firstSchool: null,
        firstDate: null,
        firstMajor: null,
        lastLevel: null,
        isFulltime: null,
        lastSchool: null,
        lastDate: null,
        lastMajor: null,
        archivesUnit: null,
        archivesNumber: null,
        hasProfession: null,
        hasCertificate: null,
        hasAward: null,
        hasPatent: null,
        hasPaper: null,
        hasStudy: null,
      };
      this.form2 = {
        id: null,
        photo: null,
        idcardFront: null,
        idcardBack: null,
        name: null,
        gender: null,
        nation: null,
        usedName: null,
        idcard: null,
        birth: null,
        nativePlace: null,
        address: null,
        phone: null,
        political: null,
        firstLevel: null,
        firstSchool: null,
        firstDate: null,
        firstMajor: null,
        lastLevel: null,
        isFulltime: null,
        lastSchool: null,
        lastDate: null,
        lastMajor: null,
        archivesUnit: null,
        archivesNumber: null,
        hasProfession: null,
        hasCertificate: null,
        hasAward: null,
        hasPatent: null,
        hasPaper: null,
        hasStudy: null,
      };
      this.resetForm("form");
      this.resetForm("form1");
      this.resetForm("form2");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.id);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加人员基本信息";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids;
      getBasicInfo(id).then((response) => {
        this.form1 = response.data;
        this.form2 = response.data;
        this.updateFormVisible = true;
        this.title = "修改人员基本信息";
      });
    },
    /** 详情按钮操作 */
    handleClick(row) {
      this.reset();
      const id = row.id || this.ids;
      getBasicInfo(id).then((response) => {
        this.form1 = response.data;
        this.form2 = response.data;
        this.dialogFormVisible = true;
        this.title = "查看人员详细信息";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form1.id != null) {
            updateBasicInfo(this.form1).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.updateFormVisible = false;
              this.getList();
            });
          } else {
            addBasicInfo(this.form).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    // submitForm1() {
    //   this.$refs["form1"].validate((valid) => {
    //     if (valid) {
    //       if (this.form1.id != null) {
    //         updateBasicInfo(this.form1).then((response) => {
    //           this.$modal.msgSuccess("修改成功");
    //           this.open = false;
    //           this.getList();
    //         });
    //       } else {
    //         addBasicInfo(this.form).then((response) => {
    //           this.$modal.msgSuccess("新增成功");
    //           this.open = false;
    //           this.getList();
    //         });
    //       }
    //     }
    //   });
    // },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal
        .confirm('是否确认删除人员基本信息编号为"' + ids + '"的数据项？')
        .then(function () {
          return delBasicInfo(ids);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download(
        "profession/basicInfo/export",
        {
          ...this.queryParams,
        },
        `basicInfo_${new Date().getTime()}.xlsx`
      );
    },
  },
};
</script>
